package com.letcode;

import sun.nio.cs.ext.ISO2022_CN_CNS;

import java.util.*;

public class test {
    public static void main(String[] args) {

        t();

    }
    public boolean isPalindrome(int x) {

        if (x<=0||(x/10==0&&x!=0)){
            return false;
        }
        int reverse=0;
        while (x>reverse){
            reverse=reverse*10+x%10;
            x=x/10;
        }
        return x==reverse ||x==reverse/10;
    }
    public static boolean isUnique(String astr) {
        char[] sa=astr.toCharArray();
        int length = astr.length();
        for (int i = 0; i <length ; i++) {
            for (int j = i+1; j <length ; j++) {
                if (sa[i]==sa[j]) {
                    return false;
                }
            }
        }
        return true;
       /* int mark = 0;
        for(char ch : astr.toCharArray()) {
            int index = ch - 'a';
            if((mark & (1 << index)) != 0) {
                return false;
            } else {
                mark |= (1 << index);
            }
        }
        return true;*/

    }
    public static boolean wordPattern(String pattern, String s) {
/*
        Map<Character,String> map = new HashMap<>();
        String[] strs = s.split(" ");
        int len = strs.length;
        if(pattern.length() != len){
            return false;
        }
        for (int i = 0; i < len; i++) {
            char c = pattern.charAt(i);
            if (!map.containsKey(c)) {
                if(!map.containsValue(strs[i])){
                    map.put(c,strs[i]);
                }else{
                    return false;
                }
            }else if(!map.get(c).equals(strs[i])){
                return false;
            }
        }
        return true;*/
        Map<Character, String> map = new HashMap<>();
        String[] split = s.split(" ");
        int n=split.length;
        if (n!=pattern.length()){
            return false;
        }
        for (int i = 0; i <n ; i++) {
            char c = pattern.charAt(i);
            if (!map.containsKey(c)){
                if (!map.containsValue(split[i])){
                    map.put(c,split[i]);
                }else {
                    return false;
                }
            }else if (!map.get(c).equals(split[i])){
                return false;
            }
        }
        return true;
    }
    public static int maxProfit(int[] prices, int fee) {
    /*    int n = prices.length;
        int[][] dp = new int[n][2];
        dp[0][0] = 0;
        dp[0][1] = -prices[0];
        for (int i = 1; i < n; ++i) {
            dp[i][0] = Math.max(dp[i - 1][0], dp[i - 1][1] + prices[i] - fee);
            dp[i][1] = Math.max(dp[i - 1][1], dp[i - 1][0] - prices[i]);
        }
        return dp[n - 1][0];*/
        int n=prices.length;
        int[][] ints = new int[n][2];
        ints[0][0]=0;
        ints[0][1]=-prices[0];
        for (int i = 1; i <n ; i++) {
            ints[i][0]=Math.max((ints[i-1][0]),ints[i-1][1]+prices[i]-fee);
            ints[i][1]=Math.max(ints[i-1][1],ints[i-1][0]-prices[i]);
        }
        return ints[n-1][0];

    }
    public static char findTheDifference(String s, String t) {

        char ans = t.charAt(t.length()-1);
        for(int i = 0; i < s.length(); i++) {
            ans ^= s.charAt(i);
            ans ^= t.charAt(i);
        }
        return ans;
    }
    public String removeDuplicateLetters(String s) {
        /*
        思路：使用一个hashMap记录每个字母出现的次数，使用visited这个hashMap记录每个字母是否被添加过，然后遍历字符串中的字母
        ，字母的次数减1，如果字母被添加过说明安排妥当剩余个数-1，继续循环；如果字母没被添加过，那么和结果中的最后一个字母进行比较，如果结果的最后一个字母大并且次数大于0那么删除结果最后一个字母并设置为未添加，
        添加遍历的字母并设置为已添加，如果结果的最后一个字母小那么直接添加遍历的字母并设置为已添加
         */
        HashMap<Character,Integer> sNum=new HashMap<>();
        HashMap<Character, Boolean> visited=new HashMap<>();
        char[] chars=s.toCharArray();
        for (char c:chars
        ) {
            if (sNum.containsKey(c))
            {
                sNum.put(c,sNum.get(c)+1);
            }else {
                sNum.put(c,1);
            }
        }
        Set<Character> set=sNum.keySet();
        for (Character c:set
        ) {
            visited.put(c,false);
        }
        List<Character> res=new ArrayList<>(set.size());
        res.add('0');
        for (int i = 0; i < chars.length; i++) {
            char c=chars[i];
            if (!visited.get(c))
            {
                char last=res.get(res.size()-1);
                if (last>c)
                {
                    if (sNum.get(last)>0)
                    {
                        res.remove(res.size()-1);
                        visited.put(last,false);
                        i--;
                    }else {
                        //添加完字母后，字母数量-1
                        sNum.put(c,sNum.get(c)-1);
                        res.add(c);
                        visited.put(c,true);
                    }
                }
                else if (last<c)
                {
                    sNum.put(c,sNum.get(c)-1);
                    res.add(c);
                    visited.put(c,true);
                }
            }
            //该字母已在合适的位置不用管，剩余数量-1即可
            else {
                sNum.put(c,sNum.get(c)-1);
            }
        }
        StringBuilder sb=new StringBuilder();
        for (int i = 1; i < res.size(); i++) {
            sb.append(res.get(i));
        }
        return sb.toString();
    }
    public static String longestCommonPrefix(String[] strs) {

       if (strs==null||strs.length==0){
           return "";
       }
        String pre= strs[0];
        int length = strs.length;
        for (int i = 1; i <length ; i++) {
            pre = longestCommonPrefix(pre, strs[i]);
            if (pre.length() == 0) {
                break;
            }

        }
        return pre;
    }
    public static String longestCommonPrefix(String str1,String str2) {

        int i = Math.min(str1.length(), str2.length());
        int index=0;
        if (index<=i&&str1.charAt(index)==str2.charAt(index)){
            index++;
        }
        return str1.substring(0,index);
    }
    public static String longestCommonPrefix2(String[] strs) {

        if (strs.length==0||strs==null){
            return "";
        }
        int lenth=strs.length;
        String pre=strs[0];
        int count =pre.length();
        for (int i = 0; i <count; i++) {
            char c=strs[0].charAt(i);
            for (int j = 1; j <lenth ; j++) {
                if (i == strs[j].length() || strs[j].charAt(i) != c) {
                    return strs[0].substring(0, i);
                }


            }
        }
        return strs[0];
    }
    public static int firstUniqChar(String s) {
        HashMap<Character, Integer> map = new HashMap<>();
        for (int i = 0; i <s.length() ; i++) {
            char ch=s.charAt(i);
            map.put(ch,map.getOrDefault(ch,0)+1);
        }
        for (int i = 0; i < s.length(); i++) {
            if (map.get(s.charAt(i))==1){
                return i;
            }
        }
        return -1;
    }
    public static List<List<Integer>> threeSum(int[] nums) {
        List<List<Integer>> lists = new ArrayList<>();
        //排序
        Arrays.sort(nums);
        //双指针
        int len = nums.length;
        for(int i = 0;i < len;++i) {
            if(nums[i] > 0) {
                return lists;
            }
            if(i > 0 && nums[i] == nums[i-1]) {
                continue;
            }

            int curr = nums[i];
            int L = i+1, R = len-1;
            while (L < R) {
                int tmp = curr + nums[L] + nums[R];
                if(tmp == 0) {
                    List<Integer> list = new ArrayList<>();
                    list.add(curr);
                    list.add(nums[L]);
                    list.add(nums[R]);
                    lists.add(list);
                    while(L < R && nums[L+1] == nums[L]) ++L;
                    while (L < R && nums[R-1] == nums[R]) --R;
                    ++L;
                    --R;
                } else if(tmp < 0) {
                    ++L;
                } else {
                    --R;
                }
            }
        }
        return lists;
    }
    public static int threeSumClosest(int[] nums, int target) {

        Arrays.sort(nums);
        int n=nums.length;
        int bext=10000;
        for (int i = 0; i < n; i++) {
            if (i<0&&nums[i]==nums[i-1])
            {
                continue;
            }
            int s=i+1;int k=n-1;
            while (s<k){
                int sum=nums[i]+nums[s]+nums[k];
                if (sum==target){
                    return target;
                }
                if (Math.abs(sum-target)<Math.abs(bext-target)){
                    bext=sum;
                }
                if (sum > target) {
                    // 如果和大于 target，移动 c 对应的指针

                    // 移动到下一个不相等的元素
                    int k0=k-1;
                    while (k0>s&& nums[k0]==nums[k]){
                        --k0;
                    }
                    k=k0;
                } else {
                    // 如果和小于 target，移动 b 对应的指针
                    int j0 = s + 1;
                    // 移动到下一个不相等的元素
                    while (j0 < k && nums[j0] == nums[s]) {
                        ++j0;
                    }
                    s=j0;
                }
            }
        }
        return bext;
    }
    public static ListNode mergeTwoLists(ListNode l1, ListNode l2) {

        if (l1 == null) {
            return l2;
        }
        else if (l2 == null) {
            return l1;
        }
        else if (l1.val < l2.val) {
            l1.next = mergeTwoLists(l1.next, l2);
            return l1;
        }
        else {
            l2.next = mergeTwoLists(l1, l2.next);
            return l2;
        }


    }
    public static int removeDuplicates(int[] nums) {
        if (nums.length == 0) return 0;
        int i = 0;
        for (int j = 1; j < nums.length; j++) {
            if (nums[j] != nums[i]) {
                i++;
                nums[i] = nums[j];
            }
        }
        return i + 1;
    }



    public static int removeElement(int[] nums, int val) {
        int i = 0;
        for (int j = 0; j < nums.length; j++) {
            if (nums[j] != val) {//若相同，跳过
                nums[i] = nums[j];
                i++;
            }
        }
        return i;
    }
    public static int strStr(String haystack, String needle) {

        char c = needle.charAt(0);

        for (int i = 0; i < haystack.length(); i++) {
            if (haystack.charAt(i)==c){
                return i;
            }
        }
        return -1;

    }
    public static ListNode swapPairs(ListNode head) {

        if (head==null||head.next==null){
            return null;
        }
        ListNode next = head.next;
        head.next=swapPairs(head.next);
        next.next=head;
        return next;
    }
    public static int fib(int n) {

        if (n<2){
            return n;
        }
        int p = 0, q = 0, r = 1;
        for (int i = 2; i <= n; ++i) {
            p = q;
            q = r;
            r = p + q;
        }
        return r;


    }
    public static List<List<Integer>> largeGroupPositions(String s) {

        List<List<Integer>> list = new ArrayList<List<Integer>>();
        int n=s.length();
        int num=1;
        for (int i = 0; i <n ; i++) {
            if (i==n-1||s.charAt(i)!=s.charAt(i+1)){
                if (num>=3){

                    list.add(Arrays.asList(i-num+1,i));
                }
                num=1;
            }else {
                num++;
            }
        }
        return list;

    }
    public static int climbStairs(int n) {

        if(n==0||n==1){
            return n;
        }
        int[] dps = new int[n+1];
        dps[1]=1;
        dps[2]=2;
        for (int i = 3; i <= n; i++) {
            dps[i]=dps[i-1]+dps[i-2];
        }
        return dps[n];

    }
    public static int rob(int[] nums) {

        int l=nums.length;
        if (l==0){
            return 0;
        }
        int[] dps = new int[l+1];
        dps[0]=0;
        dps[1]=nums[0];

        for (int i = 2; i <=l ; i++) {
            dps[i]=Math.max(dps[i-1],dps[i-2]+nums[i-1]);
        }
        return dps[l];
    }
    public static void t(){
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            int a=0;
            int b=0;
            a=scanner.nextInt();
            b=scanner.nextInt();
            System.out.println(a+b);

        }

    }








}
